package so.sao.code.service.domain.event;

import lombok.Data;
import so.sao.code.service.domain.entity.RangeActivation;
import so.sao.code.service.domain.entity.TagBatch;
import so.sao.code.service.infrastructure.enums.OPERATION;

/**
 * Created by Administrator on 2017/9/13.
 */
@Data
public class RangeActivationActiveEvent {
    private TagBatch tagBatch;
    private RangeActivation rangeActivation;
    private OPERATION operation;

    public RangeActivationActiveEvent(TagBatch tagBatch, RangeActivation rangeActivation, OPERATION operation) {
        this.rangeActivation = rangeActivation;
        this.tagBatch = tagBatch;
        this.operation = operation;
    }

    public boolean isActive() {
        return getOperation() == OPERATION.ACTIVAE ? true : false;
    }
}
